home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
071-080
/
amok73
/
ums
/
doc
/
ums.h
< prev
Wrap
C/C++ Source or Header
|
1993-11-04
|
12KB
|
265 lines
#ifndef UMS_H
#define UMS_H
/*
* libraries/ums.h
*
* C definitions for ums.library (V9)
*
*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif
#define UMSNAME "ums.library"
#define UMSVERSION 9
/* typedefs */
typedef char **OldUMSMsg; /* OBSOLETE!! OBSOLETE!! OBSOLETE!! */
typedef void *UMSUserAccount; /* UMS user account */
typedef LONG UMSMsgNum; /* UMS message number */
typedef WORD UMSError; /* UMS error number */
typedef LONGBITS UMSSet; /* UMS bit set */
typedef APTR UMSPHandle; /* UMS pattern handle */
#define UMSMAXMSGS 2147483647 /* LONG --> 2^31-1 */
/* message array index definitions (see UMS Doc #3) */
#define UMSCODE_MsgText 0
#define UMSCODE_FromName 1
#define UMSCODE_FromPath 2
#define UMSCODE_ToName 3
#define UMSCODE_ToPath 4
#define UMSCODE_MsgID 5
#define UMSCODE_CreationDate 6
#define UMSCODE_ReceiveDate 7
#define UMSCODE_ReferID 8
#define UMSCODE_Group 9
#define UMSCODE_Subject 10
#define UMSCODE_Attributes 11
#define UMSCODE_Comments 12
#define UMSCODE_Organization 13
#define UMSCODE_Distribution 14
#define UMSNUMFIELDS 128
/* message data types */
typedef char *UMSMsgTextFields[UMSNUMFIELDS];
struct MessageInfo {
LONG msgi_HeaderLength;
LONG msgi_TextLength;
LONG msgi_Date;
UMSMsgNum msgi_ChainUp;
UMSMsgNum msgi_ChainDn;
UMSMsgNum msgi_ChainLt;
UMSMsgNum msgi_ChainRt;
UMSSet msgi_GlobalStatus;
UMSSet msgi_UserStatus;
UMSSet msgi_LoginStatus;
UMSMsgNum msgi_HardLink;
UMSMsgNum msgi_SoftLink;
};
/* user status bits */
#define UMSUSTATB_Archive 4
#define UMSUSTATF_Archive (1L<<4)
#define UMSUSTATB_Junk 5
#define UMSUSTATF_Junk (1L<<5)
#define UMSUSTATB_PostPoned 6
#define UMSUSTATF_PostPoned (1L<<6)
#define UMSUSTATB_Selected 7
#define UMSUSTATF_Selected (1L<<7)
#define UMSUSTATB_Old 8
#define UMSUSTATF_Old (1L<<8)
#define UMSUSTATB_Read UMSUSTATB_Old
#define UMSUSTATF_Read UMSUSTATF_Old
#define UMSUSTATB_WriteAccess 9
#define UMSUSTATF_WriteAccess (1L<<9)
#define UMSUSTATB_ReadAccess 10
#define UMSUSTATF_ReadAccess (1L<<10)
#define UMSUSTATB_ViewAccess 11
#define UMSUSTATF_ViewAccess (1L<<11)
#define UMSUSTATB_Owner 12
#define UMSUSTATF_Owner (1L<<12)
#define UMSUSTATF_Protected (UMSUSTATF_WriteAccess | UMSUSTATF_ReadAccess | UMSUSTATF_ViewAccess | UMSUSTATF_Owner)
/* global status bits */
#define UMSGSTATB_Deleted 0
#define UMSGSTATF_Deleted (1L<<0)
#define UMSGSTATB_Expired 1
#define UMSGSTATF_Expired (1L<<1)
#define UMSGSTATB_Exported 2
#define UMSGSTATF_Exported (1L<<2)
#define UMSGSTATB_Orphan 3
#define UMSGSTATF_Orphan (1L<<3)
#define UMSGSTATB_Link 4
#define UMSGSTATF_Link (1L<<4)
#define UMSGSTATB_HardLink 5
#define UMSGSTATF_HardLink (1L<<5)
#define UMSGSTATF_Protected (UMSGSTATF_Deleted | UMSGSTATF_Exported | UMSGSTATF_Orphan | UMSGSTATF_Link | UMSGSTATF_HardLink)
/* UMS error numbers */
#define UMSERR_OK 0
#define UMSERR_Unknown 1
#define UMSERR_CodeMissing 100
#define UMSERR_ForbiddenCode 101
#define UMSERR_NoWriteAccess 102
#define UMSERR_NoReader 103
#define UMSERR_NoExporter 104
#define UMSERR_BadLink 105
#define UMSERR_NoWork 106
#define UMSERR_NoSysop 107
#define UMSERR_Dupe 200
#define UMSERR_NoReadAccess 201
#define UMSERR_NoViewAccess 202
#define UMSERR_MsgCorrupted 203
#define UMSERR_NoHdrSpace 204
#define UMSERR_NoSuchMsg 205
#define UMSERR_BadName 206
#define UMSERR_BadTag 207
#define UMSERR_MissingTag 208
#define UMSERR_NoSuchUser 209
#define UMSERR_NotFound 210
#define UMSERR_AutoBounce 211
#define UMSERR_MsgDeleted 212
#define UMSERR_NoNetAccess 213
#define UMSERR_ServerTerminated 300
#define UMSERR_CantWrite 301
#define UMSERR_CantRead 302
#define UMSERR_WrongMsgPtr 303
#define UMSERR_ServerNotFree 304
#define UMSERR_IDCountProb 305
#define UMSERR_NoLogin 306
#define UMSERR_WrongServer 307
/* tags */
#define UMSTAG_String 0x2000
#define UMSTAG_VarPar 0x4000
/* ReadUMSMsg() */
#define UMSTAG_RMsgNum (TAG_USER + 1)
#define UMSTAG_RHeaderLength (TAG_USER + UMSTAG_VarPar + 2)
#define UMSTAG_RTextLength (TAG_USER + UMSTAG_VarPar + 3)
#define UMSTAG_RMsgDate (TAG_USER + UMSTAG_VarPar + 4)
#define UMSTAG_RChainUp (TAG_USER + UMSTAG_VarPar + 7)
#define UMSTAG_RChainDn (TAG_USER + UMSTAG_VarPar + 8)
#define UMSTAG_RChainLt (TAG_USER + UMSTAG_VarPar + 9)
#define UMSTAG_RChainRt (TAG_USER + UMSTAG_VarPar + 10)
#define UMSTAG_RGlobalFlags (TAG_USER + UMSTAG_VarPar + 11)
#define UMSTAG_RUserFlags (TAG_USER + UMSTAG_VarPar + 12)
#define UMSTAG_RLoginFlags (TAG_USER + UMSTAG_VarPar + 13)
#define UMSTAG_RHardLink (TAG_USER + UMSTAG_VarPar + 14)
#define UMSTAG_RSoftLink (TAG_USER + UMSTAG_VarPar + 15)
#define UMSTAG_RDateStyle (TAG_USER + 64)
#define UMSTAG_RIDStyle (TAG_USER + 68)
#define UMSTAG_RNoUpdate (TAG_USER + 69)
#define UMSTAG_RMsgText (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 256)
#define UMSTAG_RFromName (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 257)
#define UMSTAG_RFromPath (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 258)
#define UMSTAG_RToName (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 259)
#define UMSTAG_RToPath (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 260)
#define UMSTAG_RMsgID (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 261)
#define UMSTAG_RCreationDate (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 262)
#define UMSTAG_RReceiveDate (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 263)
#define UMSTAG_RReferID (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 264)
#define UMSTAG_RGroup (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 265)
#define UMSTAG_RSubject (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 266)
#define UMSTAG_RAttributes (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 267)
#define UMSTAG_RComments (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 268)
#define UMSTAG_ROrganization (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 269)
#define UMSTAG_RDistribution (TAG_USER + UMSTAG_String + UMSTAG_VarPar + 270)
#define UMSTAG_RMsgInfo (TAG_USER + 512)
#define UMSTAG_RTextFields (TAG_USER + 513)
#define UMSTAG_RReadHeader (TAG_USER + 514)
#define UMSTAG_RReadAll (TAG_USER + 515)
/* WriteUMSMsg() */
#define UMSTAG_WMsgNum (TAG_USER + 1)
#define UMSTAG_WMsgDate (TAG_USER + 4)
#define UMSTAG_WChainUp (TAG_USER + 7)
#define UMSTAG_WHardLink (TAG_USER + 14)
#define UMSTAG_WSoftLink (TAG_USER + 15)
#define UMSTAG_WAutoBounce (TAG_USER + 65)
#define UMSTAG_WHdrFill (TAG_USER + 66)
#define UMSTAG_WTxtFill (TAG_USER + 67)
#define UMSTAG_WNoUpdate (TAG_USER + 69)
#define UMSTAG_WMsgText (TAG_USER + UMSTAG_String + 256)
#define UMSTAG_WFromName (TAG_USER + UMSTAG_String + 257)
#define UMSTAG_WFromPath (TAG_USER + UMSTAG_String + 258)
#define UMSTAG_WToName (TAG_USER + UMSTAG_String + 259)
#define UMSTAG_WToPath (TAG_USER + UMSTAG_String + 260)
#define UMSTAG_WMsgID (TAG_USER + UMSTAG_String + 261)
#define UMSTAG_WCreationDate (TAG_USER + UMSTAG_String + 262)
#define UMSTAG_WReceiveDate (TAG_USER + UMSTAG_String + 263)
#define UMSTAG_WReferID (TAG_USER + UMSTAG_String + 264)
#define UMSTAG_WGroup (TAG_USER + UMSTAG_String + 265)
#define UMSTAG_WSubject (TAG_USER + UMSTAG_String + 266)
#define UMSTAG_WAttributes (TAG_USER + UMSTAG_String + 267)
#define UMSTAG_WComments (TAG_USER + UMSTAG_String + 268)
#define UMSTAG_WOrganization (TAG_USER + UMSTAG_String + 269)
#define UMSTAG_WDistribution (TAG_USER + UMSTAG_String + 270)
/* UMSSelect() */
#define UMSTAG_SelSet (TAG_USER + 1024)
#define UMSTAG_SelUnset (TAG_USER + 1025)
#define UMSTAG_SelWriteGlobal (TAG_USER + 1026)
#define UMSTAG_SelWriteLocal (TAG_USER + 1027)
#define UMSTAG_SelWriteUser (TAG_USER + UMSTAG_String + 1028)
#define UMSTAG_SelStart (TAG_USER + 1032)
#define UMSTAG_SelStop (TAG_USER + 1033)
#define UMSTAG_SelReadGlobal (TAG_USER + 1034)
#define UMSTAG_SelReadLocal (TAG_USER + 1035)
#define UMSTAG_SelReadUser (TAG_USER + UMSTAG_String + 1036)
#define UMSTAG_SelMask (TAG_USER + 1040)
#define UMSTAG_SelMatch (TAG_USER + 1041)
#define UMSTAG_SelParent (TAG_USER + 1042)
#define UMSTAG_SelDate (TAG_USER + 1043)
#define UMSTAG_SelTree (TAG_USER + 1044)
#define UMSTAG_SelSubTree (TAG_USER + 1045)
#define UMSTAG_SelMsg (TAG_USER + 1046)
#define UMSTAG_SelQuick (TAG_USER + 1047)
/* UMSSearch() */
#define UMSTAG_SearchLast (TAG_USER + + 2048)
#define UMSTAG_SearchQuick (TAG_USER + + 2049)
#define UMSTAG_SearchGlobal (TAG_USER + + 2050)
#define UMSTAG_SearchLocal (TAG_USER + + 2051)
#define UMSTAG_SearchUser (TAG_USER + UMSTAG_String + 2052)
#define UMSTAG_SearchDirection (TAG_USER + + 2053)
#define UMSTAG_SearchMask (TAG_USER + + 2064)
#define UMSTAG_SearchMatch (TAG_USER + + 2065)
/* ReadUMSConfig(), WriteUMSConfig() */
#define UMSTAG_CfgGlobalOnly (TAG_USER + + 3072)
#define UMSTAG_CfgStringName (TAG_USER + UMSTAG_String + 3073)
#define UMSTAG_CfgUser (TAG_USER + UMSTAG_String + 3074)
/* ReadUMSConfig() */
#define UMSTAG_CfgUserName (TAG_USER + UMSTAG_String + 3075)
/* not yet implemented :
#define UMSTAG_CfgMatchPattern (TAG_USER + 3076)
#define UMSTAG_CfgSameNetgroup (TAG_USER + UMSTAG_String + 3077)
#define UMSTAG_CfgNextAka (TAG_USER + UMSTAG_String + 3078)
#define UMSTAG_CfgNextNetgroup (TAG_USER + UMSTAG_String + 3079)
#define UMSTAG_CfgNextUser (TAG_USER + UMSTAG_String + 3080)
#define UMSTAG_CfgNextAlias (TAG_USER + UMSTAG_String + 3081)
#define UMSTAG_CfgNextString (TAG_USER + UMSTAG_String + 3082)
*/
/* WriteUMSConfig() */
#define UMSTAG_CfgDump (TAG_USER + UMSTAG_String + 3088)
#define UMSTAG_CfgStringData (TAG_USER + UMSTAG_String + 3089)
#endif